import javax.swing.*;
import java.awt.*;

public class AttendanceSystemGUI extends JFrame {
    public AttendanceSystemGUI() {
        setTitle("考勤管理系统");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(600, 400);

        // 创建员工列表
        String[] employeeData = {"员工1", "员工2", "员工3", "员工4", "员工5"}; // 假设这是员工列表数据
        JList<String> employeeList = new JList<>(employeeData);
        JScrollPane employeeScrollPane = new JScrollPane(employeeList);

        // 创建打卡记录文本区域
        JTextArea recordTextArea = new JTextArea();
        JScrollPane recordScrollPane = new JScrollPane(recordTextArea);

        // 布局设置
        JPanel panel = new JPanel(new GridLayout(1, 2));
        panel.add(employeeScrollPane);
        panel.add(recordScrollPane);

        getContentPane().add(panel);
        setVisible(true);
    }

    public static void main(String[] args) {
        SwingUtilities.invokeLater(() -> {
            new AttendanceSystemGUI();
        });
    }
}
